<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/jsp/include/taglibs.tag"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>个人信息管理</title>
<%@ include file="/WEB-INF/jsp/include/backBase.jsp"%>
<link href="<%=resources%>/myCss/back/userInfor.css" rel="stylesheet"
	type="text/css">
<script type="text/javascript"
	src="<%=resources%>/myJs/back/userInfor.js"></script>
</head>
<body>
	<div class="modal fade" id="userInforModal" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true"></div>
	<div class="modal fade" id="uploadImageModal" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<!-- 模态框（Modal） -->
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">上传头像</h4>
				</div>
				<div class="modal-body">
					<form action="<%=ctx%>/back/user/uploadImage.do" method="post" enctype="multipart/form-data">
						<input name="id" value="${user.id }" type="hidden">
						<p>
							<input type="file" name="userImage" class="form-control"
								 accept=".jpeg,.jpg,.gif" />
						</p>
						<div class="modal-footer">
							<button type="button" class="btn btn-default"
								data-dismiss="modal">关闭</button>
							<button type="submit" class="btn btn-primary">上传头像</button>
						</div>
					</form>
				</div>
			</div>
			<!-- /.modal-content -->
		</div>
		<!-- /.modal -->
	</div>
	<div class="head-pic-box">
		<div class="container">
			<img src="<%=resources%>/upload/image/${user.imageName}" ></img>
			<div class="upload-pic-box">
				<form>
					<a href="javascript:showModal('#uploadImageModal')"
						class="btn btn-primary btn-sm">上传头像</a>
				</form>
			</div>
		</div>
	</div>
	<div class="user-infor-box">
		<p>姓名：${user.nickname }</p>
		<p>年龄：${user.age }</p>
		<p>性别：${user.sex }</p>
		<p>生日：${user.birthday }</p>
		<p>个人描述：${user.infor }</p>
		<a
			href="javascript:ajaxShow('<%=ctx%>/ajax/showUser.do','#userInforModal','1')"
			class="btn btn-primary btn-sm" id="userEdit">编辑</a>
	</div>
</body>
</html>